package us.gaaoc.framework.model;

import java.util.Date;



/**
 * CaseRecordHistory
 */

public class CaseRecordHistory  implements java.io.Serializable,Comparable<CaseRecordHistory> {

	private static final long serialVersionUID = 1L;


	@Override
	public int compareTo(CaseRecordHistory o) {
		if(o.getEventID() == this.getEventID()) return 0;
		return o.eventDateTime.compareTo(this.eventDateTime);
	}

    // Fields    

     private int eventID;
     private CaseRecord caseRecord;
     private CaseRecordEventType eventType;
     private Date eventDateTime;
     // Added by Frank
     private Person person;
     //Added by Jogi
     private String comments="no comments";
     
     
     // End


    // Constructors


	/** default constructor */
    public CaseRecordHistory() {
    }
    
    public CaseRecordHistory(CaseRecord cr, CaseRecordEventType eventType, Date eventDateTime, Person person,String comments){
    	this.setCaseRecord(caseRecord);
    	this.setEventType(eventType);
    	this.setEventDateTime(eventDateTime);
    	this.setPerson(person);
    	if(comments!=null&&!comments.equals(""))
    	this.setComments(comments);
    }
    
      // Property accessors

    public CaseRecordEventType getEventType() {
		return eventType;
	}

	public void setEventType(CaseRecordEventType eventType) {
		this.eventType = eventType;
	}
  

    public CaseRecord getCaseRecord() {
        return this.caseRecord;
    }
    
    public void setCaseRecord(CaseRecord caseRecord) {
        this.caseRecord = caseRecord;
    }


    public Date getEventDateTime() {
        return this.eventDateTime;
    }
    
    public void setEventDateTime(Date eventDateTime) {
        this.eventDateTime = eventDateTime;
    }

   

	public int getEventID() {
		return eventID;
	}

	public void setEventID(int eventID) {
		this.eventID = eventID;
	}

	public Person getPerson() {
		return person;
	}

	public void setPerson(Person person) {
		this.person = person;
	}
   
	public String getComments() {
        return comments;
}

public void setComments(String comments) {
	if(comments!=null&&!comments.equals(""))
        this.comments = comments;
}







}